﻿using UnityEngine;

public static class GameEventManager {

	public delegate void GameEvent();

	public static event GameEvent GameStart, GameOver;

	public static void TriggerGameStart(){
		if(GameStart != null){
			GameStart();
		}
	}

	public static void TriggerGameOver(){
		if(GameOver != null){
			GameOver();
		}
	}

	public static bool isTapped(){
		#if !UNITY_EDITOR && ( UNITY_IOS || UNITY_ANDROID ) 
		return (Input.touchCount == 1);
		#else
		return Input.GetButtonDown("Jump");
		#endif 
	}

	public static string tip(){
		#if !UNITY_EDITOR && ( UNITY_IOS || UNITY_ANDROID ) 
		return "tap screen to play/Jump";
		#else
		return "press Jump (space) to play";
		#endif
	}
}